{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
            <div class="tab_title">
                <ul class="nav nav-pills">
                    <li>
                        <a href="{{ buildUrl('/food/index') }}">美食列表</a>
                    </li>
                    <li class="current">
                        <a href="{{ buildUrl('/food/cat') }}">分类列表</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="row m-t  wrap_cat_set">
        <div class="col-lg-12">
            <h2 class="text-center">分类设置</h2>
            <div class="form-horizontal m-t m-b">
                <div class="form-group">
                    <label class="col-lg-2 control-label">分类名称:</label>
                    <div class="col-lg-10">
                        <input type="text" name="name" class="form-control" placeholder="请输入分类名称"
                               value="{{ info.name }}">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">权重:</label>
                    <div class="col-lg-10">
                        <input type="text" name="weight" class="form-control" placeholder="请输入分类名称"
                               value="{% if info and info.weight > 0 %}{{ info.weight }}{% else %}1{% endif %}">
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-lg-4 col-lg-offset-2">
                        <input type="hidden" name="id" value="{{ info.id }}">
                        <button class="btn btn-w-m btn-outline btn-primary save">保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/food/cat_set.js') }}"></script>
{% endblock %}

